class Solution
{
public:
    vector<int> countPoints(vector<vector<int>> &points, vector<vector<int>> &queries)
    {
        int m = points.size(), n = queries.size();
        vector<int> ret(n);
        for (int i = 0; i < n; i++)
        {
            int cx = queries[i][0], cy = queries[i][1], cr = queries[i][2];
            for (int j = 0; j < m; j++)
            {
                int px = points[j][0], py = points[j][1];
                if ((cx - px) * (cx - px) + (cy - py) * (cy - py) <= cr * cr)
                    ++ret[i];
            }
        }
        return ret;
    }
};